| Conditions | 1 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | |||
| 24 | async function cardPayment(customer,products,amount, card_details, callback_details) { |
||
| 25 | headers = { |
||
| 26 | "domain": process.env.CHPTER_CLIENT_DOMAIN, |
||
| 27 | "Authorization":"Token "+ process.env.CHPTER_TOKEN |
||
| 28 | }; |
||
| 29 | |||
| 30 | data = { |
||
| 31 | "customer_details" : customer, |
||
| 32 | "products" : products, |
||
| 33 | "amount" : amount, |
||
| 34 | "card_details" : card_details, |
||
| 35 | "callback_details" : callback_details |
||
| 36 | }; |
||
| 37 | let res = await axios.post("https://chpter.co/api/payment/payment-initiate-callback/", data, { headers: headers}); |
||
| 38 | |||
| 39 | return res.data; |
||
| 40 | }; |
||
| 41 | |||
| 57 | } |